<?php

class DefaultController extends FController {

    public function actionIndex() {
        $this->redirect('/');
    }
    
    public function actionError() {
        $error = Yii::app()->errorHandler->error;
        if ( $error ) {
            if (Yii::app()->request->isAjaxRequest)
                echo $error['message'];
            else
                $this->render('error', $error);
        }
    }
    
}